<br /><br />
<script>var js_url = "<?php echo $img_url; ?>";</script>
<script type="text/javascript" src="<?php echo $img_url; ?>style/js/BE/admin_news.js"></script>
<script type="text/javascript" src="<?php echo $img_url; ?>style/js/BE/admin_news_auto.js"></script>
<script type="text/javascript" src="<?php echo $img_url; ?>style/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
    function InsertArticle() {

        if ($("#cbo_cate").val() == "") {
            alert("Vui lòng chọn chuyên mục");
            $("#cbo_cate").focus();
        }
        else if ($("#txt_title").val() == "") {
            alert("Vui lòng nhập tiêu đề bài viết");
            $("#txt_title").focus();
        }
        else {
            $("#trueform2").submit();
        }
    }
</script>

<form name="trueform2" id="trueform2" method="POST" action="<?php echo $base_url; ?>admin_knowledge/<?php echo $pagePost; ?>">
    <table width="80%" border="0" cellspacing="1" cellpadding="0" align="center" style="margin:auto; background-color:#3D84CC;">
        <tr>
            <td colspan="2" align="left" bgcolor="#3D84CC" class="title3">&nbsp;Cập nhật <?php echo $page_title; ?></td>
        </tr>
        <tr>
            <td align="right" bgcolor="#FFFFFF" class="title2"><span class="star">*</span>&nbsp;Chuyên mục:</td>
            <td align="left" bgcolor="#FFFFFF" class="title2">
                <select name="cbo_cate" id="cbo_cate">
                    <option value="">-- Chọn --</option>
                    <?php
                    foreach ($listCate as $key => $item) {
                        if ($item->cate_id == $cateSelected) {
                            echo "<option value='" . $item->cate_id . "' selected>" . $item->cate_name . "</option>";
                        } else {
                            echo "<option value='" . $item->cate_id . "'>" . $item->cate_name . "</option>";
                        }
                    }
                    ?>          
                </select>    
            </td>
        </tr>       
        <tr>
            <td align="right" bgcolor="#FFFFFF" class="title2"><span class="star">*</span>&nbsp;Tiêu đề:</td>
            <td align="left" bgcolor="#FFFFFF" class="title2">
                <input type="text" name="txt_title" id="txt_title" class="text2" style="width:650px;" value="<?php echo $title; ?>" />     
            </td>
        </tr>
        <?php if (isset($order) && $order != null) { ?>
            <tr>
                <td align="right" bgcolor="#FFFFFF" class="title2"><span class="star">*</span>&nbsp;Order Index:</td>
                <td align="left" bgcolor="#FFFFFF" class="title2">
                    <input type="text" name="txt_order" id="txt_order" class="text2" style="width:650px;" value="<?php echo $order; ?>" />     
                </td>
            </tr>  
        <?php } ?>
        <tr id="tr_noi_dung_chi_tiet">
            <td align="right" bgcolor="#FFFFFF" class="title2">Nội dung</td>
            <td align="left" bgcolor="#FFFFFF" class="title2">
                <textarea class="ckeditor" cols="10" id="txt_content" name="txt_content" rows="2">
                    <?php echo $content; ?>
                </textarea>
            </td>
        </tr>
        <td colspan="2" style="text-align:center;" bgcolor="#FFFFFF" height="30px">
            <input type="button" name="btnInsert" id="btnInsert" style="width:70px;" class="button" onclick="InsertArticle();" value="Thực hiện" />
        </td>
        </tr>
    </table>
    <input type="hidden" name="isPost" value="isPost" />
</form>